//
//  DHS2_MessageCell.m
//  Dresshere
//
//  Created by ZhangPeng on 2018/6/7.
//  Copyright © 2018年 张朋. All rights reserved.
//

#import "DHS2_MessageCell.h"

@implementation DHS2_MessageCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)updateCell:(NSDictionary *)dic{
    if ([[dic objectForKey:@"read"] boolValue]) {
        [self.redImageView setImage:nil];
    }else{
        [self.redImageView setImage:[UIImage imageNamed:@"red"]];
    }
    self.titleLabel.text = [dic objectForKey:@"title"];
    self.disLabel.text = [dic objectForKey:@"summary"];
    NSDate *date = [NSDate dateWithServerISOString:[dic objectForKey:@"createdAt"] format:@"yyyy-MM-dd'T'HH:mm:ss.SSSZ"];
    self.timeLabel.text = [NSDate stringFromDate:date withFormat:@"yyyy-MM-dd HH:mm"];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
